package com.tx.java8.lock;

import java.util.concurrent.locks.ReentrantLock;

/**
 * ReentranctLock测试
 *
 * @author ：tx
 * @version:
 */
public class LockTest {
    public static void main(String[] args){
        ReentrantLock reentrantLock = new ReentrantLock(true);
        try{
            reentrantLock.lock();

            System.out.println("测试 Lock");
        }finally {
            reentrantLock.unlock();
        }
    }
}
